package cn.edu.zhku.citrusmonitor.baseinfo.disease.service;

import java.sql.SQLException;
import java.util.List;

import cn.edu.zhku.citrusmonitor.domain.Bean;
import cn.edu.zhku.citrusmonitor.domain.TbDisease;
import cn.edu.zhku.citrusmonitor.util.xy.PageBean;
import net.sf.json.JSONObject;

/**
 * @author 欣裕
 * @date 2018年8月2日
 * 
 */
public interface DiseaseService {

	JSONObject modifyDisease(TbDisease disease);

	JSONObject removeDisease(TbDisease disease);

	JSONObject addDisease(TbDisease disease);

	/**
	 * 根据id显示病害正文
	 * @param diseaseId
	 * @return Bean
	 */
	List<TbDisease> getDisease(String diseaseId);
	
	/**
	 * 获取最近的病害列表
	 * @param pageSize
	 * @param disease
	 * @return List
	 */
	List<Bean> findRecentDisease(Integer pageSize, Bean bean);

	/**
	 * 分页查看病害列表
	 * @param currentPage
	 * @param pageSize
	 * @param disease
	 * @return
	 */
	PageBean<Bean> findDiseasePageBean(Integer currentPage, Integer pageSize);

	PageBean<TbDisease> findAllDiseaseDetail(Integer currentPage, Integer pageSize);

	PageBean<TbDisease> findAllDiseaseDetailByWord(Integer currentPage, Integer pageSize, String word);

	Bean showDisease(String id);
	
	/**
	 * 批量删除，后台管理
	 * @param ids
	 * @return 
	 * @throws SQLException 
	 */
	JSONObject delSelect(String[] ids);
}
